package biz;

import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;

import dao.DeptDao;
import entity.Dept;
import util.ConnectFactory;

public class DeptBiz {
	DeptDao deptDao = new DeptDao();
	public List<Dept> selectAllDept(){
		List<Dept> list = new ArrayList<Dept>();
		try {
			Connection conn = ConnectFactory.getConnection();
			list = deptDao.selectAllDept(conn);
			conn.close();
		}
		catch(Exception e) {
			e.printStackTrace();
		}
		return list;
	}
}
